Skip to content

Conversation

@magic-mirror-bot
Copy link

Previously, if labels or annotations inside an objectTemplate used
values that were not strings, the ConfigurationPolicy might try to
remove all labels or annotations on that object. That behavior was
potentially destructive, and it was easy for a policy author to
accidentally trigger by getting some quotes wrong in their template, or
by using `yes` as a value (which is interpreted by some parsers as a
boolean `true`).

Now, the ConfigurationPolicy will emit a special error if the input
object template has invalid labels or annotations.

Refs:
 - https://issues.redhat.com/browse/ACM-26186

Signed-off-by: Justin Kulikauskas <[email protected]>
(cherry picked from commit c20f5551aa38a480afd90aa3071e1fbbad821481)
@openshift-ci
Copy link

openshift-ci bot commented Nov 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: magic-mirror-bot[bot]
Once this PR has been reviewed and has the lgtm label, please assign jan-law for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sonarqubecloud
Copy link

@magic-mirror-bot magic-mirror-bot bot merged commit c42c14f into main Nov 13, 2025
19 of 20 checks passed
@magic-mirror-bot magic-mirror-bot bot deleted the magic-mirror-main-1762997631275 branch November 13, 2025 02:08
@JustinKuli
Copy link
Contributor

/cherry-pick release-2.15

@openshift-cherrypick-robot

@JustinKuli: new pull request created: #1560

In response to this:

/cherry-pick release-2.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants